<tr
    {if $position_identifier}id="tr_{$position_group_identifier}_{$tr.$identifier}_{if isset($tr.position['position'])}{$tr.position['position']}{else}0{/if}"{/if}
    class="{if isset($tr.class)} {$tr.class}{/if} {if $tr@iteration is odd by 1}odd{/if}"
    {if isset($tr.color) && $color_on_bg}style="background-color: {$tr.color}"{/if} >
    {if $bulk_actions && $has_bulk_actions}
        <td class="text-center">
            {if isset($list_skip_actions.delete)}
                {if !in_array($tr.$identifier, $list_skip_actions.delete)}
                    <input type="checkbox" name="{$list_id}Box[]" value="{$tr.$identifier}"{if isset($checked_boxes) && is_array($checked_boxes) && in_array({$tr.$identifier}, $checked_boxes)} checked="checked"{/if} class="noborder" />
                {/if}
            {else}
                <input type="checkbox" name="{$list_id}Box[]" value="{$tr.$identifier}"{if isset($checked_boxes) && is_array($checked_boxes) && in_array({$tr.$identifier}, $checked_boxes)} checked="checked"{/if} class="noborder" />
            {/if}
        </td>
    {/if}
    {foreach $fields_display AS $key => $params}
        {block name="open_td"}
            <td
                {if isset($params.position)}
                    id="td_{if !empty($position_group_identifier)}{$position_group_identifier}{else}0{/if}_{$tr.$identifier}"
                {/if}
                class="{if !$no_link}pointer{/if}
                {if isset($params.position) && $order_by == 'position'  && $order_way != 'DESC'} dragHandle{/if}
                {if isset($params.class)} {$params.class}{/if}
                {if isset($params.align)} {$params.align}{/if}"
                {if (!isset($params.position) && !$no_link && !isset($params.remove_onclick))}
                    onclick="document.location = '{$current_index}&{$identifier}={$tr.$identifier}{if $view}&view{else}&update{/if}{$table}&token={$token}'">
                {else}
                    >
                {/if}
            {/block}
            {block name="td_content"}
                {if $key=='shelf'}

                    <input name='{$key}_{$tr.id_warehouse}' id='{$key}_{$tr.id_warehouse}' value='' type='text' style='display:none'/>
                    <div id='div_shelf-{$key}_{$tr.id_warehouse}'>
                        <select name='shelf-list' id ='shelf-list-{$key}_{$tr.id_warehouse}'class='shelf-list'>
                            <option value ='0'></option>
                            <option value ='-1'>New Shelf</option>
                            {foreach $shelves as $shelf}
                                {if $shelf.id_warehouse==$tr.id_warehouse }
                                    <option value ={$shelf.id_shelf}>{$shelf.name}</option>
                                {/if}
                            {/foreach}
                        </select>
                    </div>

                {elseif $key=='bin'}
                    <input name='{$key}_{$tr.id_warehouse}' id='{$key}_{$tr.id_warehouse}' value='' type='text' style='display:none'/>
                    <div id='div_bin-{$key}_{$tr.id_warehouse}'>
                        <select name='bin-list' id ='bin-list-{$key}_{$tr.id_warehouse}'class='bin-list' >
                            <option value ='0'></option>
                            <option value ='-1'>New Bin</option>
                            {*{foreach $bins as $bin}
                                <option value ={$bin.id_bin}>{$bin.name}</option>
                            {/foreach}*}
                        </select>
                    </div>
                {elseif $key =='container'}
                    <input name='{$key}_{$tr.id_warehouse}' id='{$key}_{$tr.id_warehouse}' value='' type='text' style='display:none'/>
                    <div id='div_bin-{$key}_{$tr.id_warehouse}'>
                        <select name='container-list' id ='container-list-{$key}_{$tr.id_warehouse}'class='container-list'  >
                            <option value ='0'></option>
                            <option value ='-1'>New Container</option>
                          {*  {foreach $containers as $container}
                                <option value ={$container.id_container}>{$container.name}</option>
                            {/foreach}*}
                        </select>
                    </div>
                {elseif $key=='name' || $key=='reference' || $key=='id_warehouse'||$key=="location" || $key=="contact" || $key=="employee"}
                    {$tr.$key}
                {elseif $key=='management_type' }
                    <input type="button" name='add_container'  class='add_container' id ='add_container_warehouse_{$tr.id_warehouse}' value ='Add Shelf/Bin/Container'/>
                {/if}
            {/block}
            {block name="close_td"}
            </td>
        {/block}
    {/foreach}

    {if $shop_link_type}
        <td title="{$tr.shop_name}">
            {if isset($tr.shop_short_name)}
                {$tr.shop_short_name}
            {else}
                {$tr.shop_name}
            {/if}
        </td>
    {/if}

    <td class="text-right">

    </td>

</tr>